/* 
 * File:   Jphi.h
 * Author: mori
 *
 * Created on April 30, 2011, 1:10 PM
 */
#include "Grid.h"
#ifndef _JPHI_H
#define	_JPHI_H

extern float** jphi_0;
extern float** jphi_m;
extern float** jphi_tmp;

extern float** jphi_s;

float j_phi(float r, float z, float psi);
class Jphi {
  public:
             Jphi(Grid* g);
      float point(float r, float z, float psi);
      float** on_grid(float** psi_grid, float** jphi);
      float** on_grid_initial();
      float get_gamma(float** jphi);
      float** jphi_norm(float** jphi_grid);
      float get_point(float r, float psi_);

      ~Jphi();
  private:

      Grid* grid;
      float psi_g, beta_pl, r0, alpha;
    
    int num_r;
    int num_z;
    float left_r;
    float down_z;
    float h_r;
    float h_z;
    float I;
    float delta_s;
    float pl_left_r, pl_right_r, pl_up_z, pl_down_z;

};


#endif	/* _JPHI_H */

